<template>
  <div class="app-container">
    <el-card class="box-card">
      <el-form ref="form" :model="form" >
        <el-descriptions  title="人员信息"  :column="2" border >
          <el-descriptions-item label="姓名"  label-class-name="my-label" :contentStyle='contentStyle' :labelStyle="labelStyle" >{{ form.name }}
          </el-descriptions-item>
          <el-descriptions-item label="身份证号"  label-class-name="my-label" :contentStyle='contentStyle' :labelStyle="labelStyle" >{{ form.idNumber }}
          </el-descriptions-item>
          <el-descriptions-item label="工作单位"  label-class-name="my-label" :contentStyle='contentStyle' :labelStyle="labelStyle" >
            <dict-tag :options="dict.type.yh_gas_station" :value="form.workPlace"/>
          </el-descriptions-item>
          <el-descriptions-item label="性别"  label-class-name="my-label" :contentStyle='contentStyle' :labelStyle="labelStyle" >
            <dict-tag :options="dict.type.sys_user_sex" :value="form.sex"/>
          </el-descriptions-item>
          <el-descriptions-item label="工号"  label-class-name="my-label" :contentStyle='contentStyle' :labelStyle="labelStyle" >{{ form.userName }}
          </el-descriptions-item>
          <el-descriptions-item label="手机号"  label-class-name="my-label" :contentStyle='contentStyle' :labelStyle="labelStyle" >{{ form.phone }}
          </el-descriptions-item>
          <el-descriptions-item label="职位"  label-class-name="my-label" :contentStyle='contentStyle' :labelStyle="labelStyle" >
            <dict-tag :options="dict.type.yh_posts" :value="form.posts"/>
          </el-descriptions-item>


          <el-descriptions-item label="出生日期"  label-class-name="my-label" :contentStyle='contentStyle' :labelStyle="labelStyle" >
            <span>{{ parseTime(form.birth, '{y}-{m}-{d}') }}</span>
          </el-descriptions-item>
        </el-descriptions>
        <br/>
        <el-descriptions  title="钢瓶信息"  :column="2" border >
          <el-descriptions-item label="钢瓶瓶号" :span="1" label-class-name="my-label" :contentStyle='contentStyle' :labelStyle="labelStyle" >{{form.cylinderNumber}}
          </el-descriptions-item>
          <el-descriptions-item label="应充介质"  :span="1" label-class-name="my-label" :contentStyle='contentStyle' :labelStyle="labelStyle" >
            <dict-tag :options="dict.type.yh_medium" :value="form.gasMedia"/>
          </el-descriptions-item>
          <el-descriptions-item label="钢瓶状态" label-class-name="my-label" :contentStyle='contentStyle' :labelStyle="labelStyle" >
            <dict-tag :options="dict.type.yh_cylinder_status" :value="form.cylinderStatus"/>
          </el-descriptions-item>
          <el-descriptions-item label="钢瓶重量" :span="1" label-class-name="my-label" :contentStyle='contentStyle' :labelStyle="labelStyle" >{{ form.weight }}
          </el-descriptions-item>
          <el-descriptions-item label="钢瓶容积" :span="1" label-class-name="my-label" :contentStyle='contentStyle' :labelStyle="labelStyle" >{{ form.volume }}
          </el-descriptions-item>
          <el-descriptions-item label="所属气站" :span="1" label-class-name="my-label" :contentStyle='contentStyle' :labelStyle="labelStyle" >
            <dict-tag :options="dict.type.yh_gas_station" :value="form.belongingGasStation"/>
          </el-descriptions-item>
          <el-descriptions-item label="钢瓶生产日期" :span="1" label-class-name="my-label" :contentStyle='contentStyle' :labelStyle="labelStyle" >
            <span>{{ parseTime(form.manufactureDate, '{y}-{m}-{d}') }}</span>
          </el-descriptions-item>
          <el-descriptions-item label="钢瓶报废日期" :span="1" label-class-name="my-label" :contentStyle='contentStyle' :labelStyle="labelStyle" >
            <span>{{ parseTime(form.scrapDate, '{y}-{m}-{d}') }}</span>
          </el-descriptions-item>
          <el-descriptions-item label="气瓶检验时间" :span="1" label-class-name="my-label" :contentStyle='contentStyle' :labelStyle="labelStyle" >
            <span>{{ parseTime(form.inspectionTime, '{y}-{m}-{d}') }}</span>
          </el-descriptions-item>
          <el-descriptions-item label="下次检验时间" :span="1" label-class-name="my-label" :contentStyle='contentStyle' :labelStyle="labelStyle" >
            <span>{{ parseTime(form.nextInspectionTime, '{y}-{m}-{d}') }}</span>
          </el-descriptions-item>
          <el-descriptions-item label="气瓶制造单位" :span="1" label-class-name="my-label" :contentStyle='contentStyle' :labelStyle="labelStyle" >{{ form.manufacturingUnits }}
          </el-descriptions-item>
        </el-descriptions>
        <br/>
          <el-descriptions  title="充装信息"  :column="2" border >
          <el-descriptions-item label="充装气站" :span="1" label-class-name="my-label" :contentStyle='contentStyle' :labelStyle="labelStyle" >
            <dict-tag :options="dict.type.yh_gas_station" :value="form.fillingStation"/>
          </el-descriptions-item>
          <el-descriptions-item label="充装介质" :span="1" label-class-name="my-label" :contentStyle='contentStyle' :labelStyle="labelStyle" >
            <dict-tag :options="dict.type.yh_medium" :value="form.fillingMedium"/>
          </el-descriptions-item>
          <el-descriptions-item label="充装时间" :span="1" label-class-name="my-label" :contentStyle='contentStyle' :labelStyle="labelStyle" >
            <span>{{ parseTime(form.note1,'{y}-{m}-{d}') }}</span>
          </el-descriptions-item>
            <el-descriptions-item label="充装压力" :span="1" label-class-name="my-label" :contentStyle='contentStyle' :labelStyle="labelStyle" >{{ form.fillingPressure}}
            </el-descriptions-item>
            <el-descriptions-item label="充装温度" :span="1" label-class-name="my-label" :contentStyle='contentStyle' :labelStyle="labelStyle" >{{ form.fillingTemperature}}
            </el-descriptions-item>
            <el-descriptions-item label="有无异常情况" :span="1" label-class-name="my-label" :contentStyle='contentStyle' :labelStyle="labelStyle" >
              <dict-tag :options="dict.type.yh_anomalies" :value="form.anomalies"/>
            </el-descriptions-item>
            <el-descriptions-item label="运输车辆" :span="1" label-class-name="my-label" :contentStyle='contentStyle' :labelStyle="labelStyle" >{{ form.transportVehicles}}
            </el-descriptions-item>
        </el-descriptions>
      </el-form>
      <br/>
        <el-descriptions  title="备注"  :column="2" border >
        <el-descriptions-item label="备注"  label-class-name="my-label" :contentStyle='contentStyle' :labelStyle="labelStyle" >{{ form.remark }}
        </el-descriptions-item>
        </el-descriptions>
      <div style="float:right; margin-bottom: 15px;">
        <el-button @click="viewCancel">返 回</el-button>
      </div>
    </el-card>
  </div>
</template>

<script>
import {getFilling} from "@/api/module/zzy/filling";
export default {
  name: "Filling",
  dicts: ['sys_job_status', 'sys_job_group', 'sys_user_sex','yh_gas_station','yh_posts','yh_cylinder_status','yh_medium','yh_anomalies'],
  data() {
    return {
      contentStyle: {
        'width': '550px',
      },
      labelStyle: { 'width': '100px','color': '#000000','text-align': 'right', },
      // 遮罩层
      loading: true,
      // 选中数组
      ids: [],
      // 非单个禁用
      single: true,
      // 非多个禁用
      multiple: true,
      // 显示搜索条件
      showSearch: false,
      // 总条数
      total: 0,
      // 气瓶信息表格数据
      fillingList: [],
      // 弹出层标题
      title: "",
      // 是否显示弹出层
      open: false,
      open1: false,
      // 查询参数
      queryParams: {
        pageNum: 1,
        pageSize: 10,
        name: null,
        idNumber: null,
        workPlace: null,
        sex: null,
        userName: null,
        phone: null,
        posts: null,
        birth: null,
        cylinderNumber: null,
        cylinderStatus: null,
        gasMedia: null,
        weight: null,
        volume: null,
        belongingGasStation: null,
        manufactureDate: null,
        scrapDate: null,
        fillingStation: null,
        fillingMedium: null,
        fillingTime: null,
        userId: null,
        deptId: null,
        remark: null,
        note1: null,
        note2: null,
        note3: null,
        note4: null,
        note5: null
      },
      // 表单参数
      form: {},

    };
  },
  created() {
    const id = this.$route.query.id;
    if (id) {
      // 获取表详细信息

      getFilling(id).then(res => {
        this.form = res.data;
      });
    }
  },
  methods: {
    viewCancel() {
      const id = this.$route.query.id;
      getFilling(id).then(response => {
        this.form = response.data;

      });
      const obj = { path:"/qiping/zzyfilling", query: {id} };
      this.$tab.closeOpenPage(obj);
    },
    /** 查询部门下拉树结构 */

  }
};
</script>
<style  lang="scss" scoped>
</style>
